<template>
  <div>
    <main class="main">
      <div class="subject">
        <div class="navLeft"></div>
        <div class="navRight">
          <div class="loopType">
            <currentHeader :headerTitle="'回路状态'"></currentHeader>
            <p class="title">排风联动</p>
            <div class="automaticList"
                 v-for="(item, index) in exhaustLinkage"
                 :key="index">
              <div class="topBox">
                <div class="leftIcon">
                  <img src="../../assets/img/lightUp/coDetector.png"
                       alt="" />
                </div>
                <div class="line"></div>
                <div class="rightIcon">
                  <img src="../../assets/img/lightUp/draughtOne.png"
                       alt="" />
                </div>
                <div :class="[{ running: item.type }, { notRun: !item.type }]">{{ item.type ? "运行" : "未运行" }}</div>
              </div>
              <div class="bottomBox">
                <div class="bottomContent">
                  <div class="leftText">{{ item.name }}</div>
                  <div class="rightText">{{ item.text }}</div>
                </div>
              </div>
            </div>
            <p class="title">排水联动</p>
            <div class="automaticList"
                 v-for="(item, index) in exhaustLinkage"
                 :key="index">
              <div class="topBox">
                <div class="leftIcon">
                  <img src="../../assets/img/lightUp/liquidSwitch.png"
                       alt="" />
                </div>
                <div class="line"></div>
                <div class="rightIcon">
                  <img src="../../assets/img/lightUp/well.png"
                       alt="" />
                </div>
                <div :class="[{ running: item.type }, { notRun: !item.type }]">{{ item.type ? "运行" : "未运行" }}</div>
              </div>
              <div class="bottomBox">
                <div class="bottomContent">
                  <div class="leftText">{{ item.name }}</div>
                  <div class="rightText">{{ item.text }}</div>
                </div>
              </div>
            </div>
            <p class="title">排水联动</p>
            <div class="automaticList"
                 v-for="(item, index) in exhaustLinkage"
                 :key="index">
              <div class="topBox">
                <div class="leftIcon">
                  <img src="../../assets/img/lightUp/automaticTemperatureHumidityDetector.png"
                       alt="" />
                </div>
                <div class="line"></div>
                <div class="rightIcon">
                  <img src="../../assets/img/lightUp/moisture.png"
                       alt="" />
                </div>
                <div :class="[{ running: item.type }, { notRun: !item.type }]">{{ item.type ? "运行" : "未运行" }}</div>
              </div>
              <div class="bottomBox">
                <div class="bottomContent">
                  <div class="leftText">{{ item.name }}</div>
                  <div class="rightText">{{ item.text }}</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </main>
  </div>
</template>

<script setup lang="ts" name="temperatureAutomatic">
import { ref } from 'vue'
import currentHeader from '../../components/CurrentHeader.vue'
// 排风联动
const exhaustLinkage = ref<Array<any>>([
  {
    name: 'CO探测器',
    text: '风机1',
    type: false,
  },
  {
    name: 'CO探测器',
    text: '风机1',
    type: true,
  },
  {
    name: 'CO探测器',
    text: '风机1',
    type: true,
  },
  {
    name: 'CO探测器',
    text: '风机1',
    type: true,
  },
  {
    name: 'CO探测器',
    text: '风机1',
    type: true,
  },
])
</script>

<style lang="less" scoped>
@import './temperatureAutomatic.less';
</style>
